package com.lht.logbackDemo.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    private Logger logger= LoggerFactory.getLogger(TestController.class);

    @GetMapping(value="test")
    public String test(){
        logger.debug("-------------debug-----------");
        logger.info("---------------info--------------");
        logger.warn("-------------warn-----------------");
        logger.error("---------------error------------");
        return  "log";
    }
}
